import http from '@/utils/request'

class OrgServiceTemp {

	useOrgListApi() {
		return http.get('/sys/org/list')
	}

	useOrgApi(id: Number) {
		return http.get('/sys/org/' + id)
	}

	useOrgSubmitApi(dataForm: any) {
		if (dataForm.id) {
			return http.put('/sys/org', dataForm)
		} else {
			return http.post('/sys/org', dataForm)
		}
	}
}

const OrgService = new OrgServiceTemp();
export {
	OrgService
}